package com.jdk.base.object;

import java.util.StringJoiner;

/**
 * ClassName: Address
 * Description:
 * Date: 2022/5/30 22:19 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public class Address {
    private int id;
    private String name;
    private static String username;

    /**
     * 无参构造函数
     */
    public Address() {
    }

    /**
     * 带参数的构造函数
     *
     * @param id
     * @param name
     */
    public Address(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getUsername() {
        return username;
    }

    public static void setUsername(String username) {
        Address.username = username;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Address.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("name='" + name + "'")
                .toString();
    }
}
